<template>
  <div>
    <Cell >试题答案：</Cell>
    <EditForm :infos="infos" :colon="false" :border="true" :showSubmit="false"></EditForm>
    <Cell >考试结果：100分</Cell>
  </div>
</template>

<script>
import EditForm from '@/components/EditForm/index'
import { Cell, CellGroup } from 'vant'
export default {
  name: 'paperResult',
  components: {
    Cell,
    CellGroup,
    EditForm
  },
  data () {
    return {
      infos: []
    }
  },
  created () {
    this.init()
  },
  methods: {
    init () {
      let info = this.$route.query.info
      console.log(info)
      this.infos = [
        {
          type: 'radio',
          rules: true,
          label: '',
          upTips: '1、中国的首都在哪里？',
          key: 'aa',
          list: [
            {value: '0', label: 'A.北京'},
            {value: '1', label: 'B.北京'},
            {value: '2', label: 'C.北京'},
            {value: '3', label: 'D.北京'}
          ],
          showType: 'view',
          value: info.aa
        },
        {
          type: 'checkbox',
          upTips: '2、中国的首都在哪里？',
          rules: true,
          label: '',
          key: 'bb',
          list: [
            {value: '0', label: 'A.北京'},
            {value: '1', label: 'B.北京'},
            {value: '2', label: 'C.北京'},
            {value: '3', label: 'D.北京'}
          ],
          showType: 'view',
          value: info.bb,
          viewValueFn: v => v.join(', ')
        },
        {
          type: 'textarea',
          upTips: '3、中国的首都在哪里？（简答题）',
          rules: true,
          label: '',
          key: 'cc',
          showType: 'view',
          value: info.cc
        }
      ]
    }
  }
}
</script>

<style lang="" scoped>
</style>
